<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
  <head>
    <%@include file="../common.jsp"%>
    <title>app版本管理</title>
	<meta http-equiv="cache-control" content="no-cache">
	<link rel="stylesheet" type="text/css" href="resources/css/common.css">
	<script type="text/javascript" src="resources/js/framejs/jquery.form.js"></script>  
	<script type="text/javascript" src="resources/js/app.js"></script>  
  </head>
  <body>
   	<div class="content">
   		<h4>app版本管理</h4>
   		<hr/>
	    <!-- 工具栏 -->
   		<div class="tools">
    	   <button id="btn_set_default" type="button" class="btn btn-danger" ><i class="icon icon-edit"></i> 设置为默认</button>
    	  	<button type="button" class="btn btn-primary" id="btn_scan"><i class="icon icon-search"></i> 详情</button>   	 
    	  	<button type="button" class="btn btn-warning" id="btn_iosUpdate"><i class="icon icon-arrow-up"></i> ios强制更新</button>   	 
    	   <button id="btn_search" type="button" class="btn btn-primary btn_right"><i class="icon icon-search"></i>查询</button>
       	   <input id="txt_search" type="text" class="form-control" style="float:right;display:inline;width: 200px;margin-right: 10px;" placeholder="版本号">
	    </div>	    
	    <!-- 列表 -->	    
	    <table id="tab_list" class="table table-hover table-striped mytable">
			<thead>
				<tr>
					<th style="width: 35px;"><input id="pkall" type='checkbox' class='checkbox'></th>
					<th style="width: 50px;">序号</th>
					<th>app版本</th>
					<th>下载链接</th>
					<th>更新人员</th>
					<th>更新时间</th>
					<th>状态</th>
					<th>强制更新</th>
					<th>更新说明</th>
				</tr>
			</thead>
			<tbody>			
			</tbody>
		</table>
		<!-- 分页信息条 -->
		<div id="pagebar" class="pagebar">
		  	<ul class="pager">
			</ul>
			<p id="page_info" class="page_info">显示第<span>0</span>到第<span>0</span>条记录,共<span>0</span>条</p>
		</div>
	</div>
	<div class="content">
	  	<!-- 提交新app -->
	  	<div class="panel-group" id="accordion">
		  <div class="panel panel-default">
		    <div class="panel-heading">
		      <h4 class="panel-title">
		        <a data-toggle="collapse" data-parent="#accordion" href="#collapseOne">
		           	<span class="glyphicon glyphicon-arrow-up"></span> 提交新版本
		        </a>
		      </h4>
		    </div>
		    <div id="collapseOne" class="panel-collapse collapse in">
		      <div class="panel-body">
		         <form id="form_add2" action="common/upload" enctype="multipart/form-data" class="form-horizontal" method="post">
					  <div class="form-group">
					    <label class="col-sm-1 control-label">apk文件</label>
					    <div class="col-sm-6">
						    <input id="add_apk" name="file" type="file" placeholder="请选择文件..." data-toggle="tooltip" data-placement="top" title="请上传apk文件">
					    </div>
					  </div>				 
				  </form>
			      <form id="form_add" action="app/add" class="form-horizontal" method="post" >
					  <div class="form-group">
		              <input type="hidden" name="appUrl" id="url">
					    <label class="col-sm-1 control-label">版本号</label>
					    <div class="col-sm-6">
						    <input type="text" name="appVersion" id="add_version" class="form-control" placeholder="请输入版本号,版本号不能小于当前最新版本的版本号" data-toggle="tooltip" data-placement="top" title="请输入正确的版本号">
					    </div>
					  </div>
					  <div class="form-group"> 
					    <label class="col-sm-1 control-label">更新说明</label>
					    <div class="col-sm-6">
						    <textarea rows="3" name="updateDesc" id="update_desc" class="form-control" placeholder="请输入更新说明" data-toggle="tooltip" data-placement="top" title="请输入更新说明" ></textarea>
					    </div>
					  </div>
					  <div class="form-group">
					    <div class="col-sm-offset-1 col-sm-11">
					      <input type="checkbox" name="appStatus" id = "appStatus" value="1" checked="checked"> 立即使用
					    </div>
				      </div>
					  <div class="form-group">
					    <div class="col-sm-offset-1 col-sm-11">
					       <input type="checkbox" name="forceUpdate" id= "forceUpdate" value="1"> 强制更新  
					    </div>
				      </div>
				  </form>
				  <div class="form-group">
				    <div class="col-sm-offset-1 col-sm-11">
					  <button id="btn_confirm_add" type="submit" class="btn btn-primary"><i class="icon icon-arrow-up"></i> 提交</button>
					  <button id="btn_reset" class="btn btn-default"><i class="icon icon-undo"></i> 重置</button>
					  <!--  <button id="btn_confirm_add" type="button" class="btn btn-primary">确定</button>-->
				    </div>
				  </div>
				
		      </div>
		    </div>
		  </div>
		</div>
		<!-- 详情 -->
		 <div class="modal fade bs-example-modal-lg" id="modal_scan" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
		  <div class="modal-dialog modal-lg">
		    <div class="modal-content">
		      <div class="modal-header">
		        <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
		        <h4 class="modal-title" id="myModalLabel">App详情信息</h4>
		      </div>
		      <div class="modal-body">
		         <form id="form_scan" class="form-horizontal" role="form">
				  	  <div class="form-group">
						  <label class="col-sm-2 control-label ">App版本</label>
						  <div class="col-sm-3">
						     <input type="text" name="scanVersion" class="form-control" disabled>
						  </div>
						  <label class="col-sm-1 control-label ">强制更新</label>
						  <div class="col-sm-6">
						     <input type="text" name="scanForceUpdate" class="form-control" disabled>
						  </div>
					  </div>
				  	  <div class="form-group">
						  <label class="col-sm-2 control-label ">更新时间</label>
						  <div class="col-sm-3">
						     <input type="text" name="scanUploadTime" class="form-control" disabled>
						  </div>
						  <label class="col-sm-1 control-label">状态</label>
						  <div class="col-sm-6">
							 <input type="text" name="scanStatus" class="form-control" disabled>
						  </div>
					  </div>					  
					  <div class="form-group">
						  <label class="col-sm-2 control-label">下载链接</label>
						  <div class="col-sm-10">
							 <input type="text" name="scanUrl" class="form-control" disabled>
						  </div>
					  </div>
					  
				  	  <div class="form-group">
						  <label class="col-sm-2 control-label">更新说明</label>
						  <div class="col-sm-10">
						  	<textarea rows="5" cols="" name="scanUpdateDesc" class="form-control" disabled></textarea>
						  </div>
					  </div>					   
				</form>
		      </div>
		      <div class="modal-footer">
		          <button type="button" class="btn btn-primary" data-dismiss="modal">确定</button>
		      </div>
		    </div>
	   </div>
	</div>
	</div>
  </body>
</html>
